package com.hdoit.ares.logical.ser.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hdoit.ares.logical.ser.dao.IGoodStoreDao;
import com.hdoit.ares.logical.ser.mapper.GoodStoreMapper;
import com.hdoit.ares.logical.ser.model.GoodStore;
import com.hdoit.ares.logical.viewmodel.ser.GoodStoreSearch;
import com.tennetcn.common.dao.base.IFinderExpression;
import com.tennetcn.common.dao.base.impl.SuperDao;
import com.tennetcn.common.message.PagerModel;
import com.tennetcn.common.utils.FinderExpressionFactory;
/**
 * @author      lvsi
 * @email       
 * @createtime  2017年11月22日 19:45:48
 * @comment
 */
@Component
public class GoodStoreDaoImpl extends SuperDao<GoodStore> implements IGoodStoreDao{

	private GoodStoreMapper goodStoreMapper;
	
	public GoodStoreMapper getGoodStoreMapper() {
		return goodStoreMapper;
	}

	@Resource
	public void setGoodStoreMapper(GoodStoreMapper goodStoreMapper) {
		this.goodStoreMapper = goodStoreMapper;
	}

	@Override
	public GoodStore queryGoodStoreById(String id) {
		IFinderExpression finderExpression=FinderExpressionFactory.createExpression();
		finderExpression.select("*")
						.from(GoodStore.class)
						.andEq("id",String.valueOf(id));
		return queryModel(finderExpression);
	}

	@Override
	public int queryCountMPById(GoodStoreSearch GoodStoreSearch, String loginId) {
		
		return goodStoreMapper.queryCountMPById(GoodStoreSearch, loginId);
	}

	@Override
	public List<GoodStore> queryListMPById(GoodStoreSearch GoodStoreSearch,
			PagerModel pagerModel, String loginId) {
		
		return goodStoreMapper.queryListMPById(GoodStoreSearch, pagerModel, loginId);
	}

	@Override
	public List<GoodStore> queryListStoreById(String loginId) {
	
		return goodStoreMapper.queryListStoreById(loginId);
	}

	@Override
	public GoodStore queryStoreName(String storeId) {
		
		return goodStoreMapper.queryStoreName(storeId);
	}

	@Override
	public List<String> queryListStoreIdById(String loginId) {
		
		return goodStoreMapper.queryListStoreIdById(loginId);
	}

	@Override
	public List<GoodStore> queryStoreById(String loginId) {
		
		return goodStoreMapper.queryStoreById(loginId);
}

	@Override
	public List<GoodStore> queryAllStore(GoodStoreSearch GoodStoreSearch,PagerModel pagerModel) {
		
		return goodStoreMapper.queryAllStore(GoodStoreSearch, pagerModel);
	}

	@Override
	public int queryAllStoreCount(GoodStoreSearch GoodStoreSearch) {
		
		return goodStoreMapper.queryAllStoreCount(GoodStoreSearch);
	}

	@Override
	public GoodStore queryPhoneByStoreId(String storeId) {
		
		return goodStoreMapper.queryPhoneByStoreId(storeId);
	}
}